{{#if (and itemViewable item.updatePath.canRead)}}
  {{#linked-block
    "vault.cluster.secrets.backend.show"
    itemPath
    class="list-item-row"
    data-test-secret-link=itemPath
    encode=true
    queryParams=(secret-query-params backendType)
  }}
    <div class="columns is-mobile">
    <div class="column is-10">
      <SecretLink
        @mode="show"
        @secret={{item.id}}
        @queryParams={{query-params type=modelType}}
        @class="has-text-black has-text-weight-semibold">
        <Icon
          @glyph='file-outline'
          @class="has-text-grey-light"/>
        {{if (eq item.id ' ') '(self)' (or item.keyWithoutParent item.id)}}
      </SecretLink>
    </div>
    <div class="column has-text-right">
      {{#if (or item.updatePath.canRead item.updatePath.canUpdate)}}
      <PopupMenu name="secret-menu">
        <nav class="menu">
          <ul class="menu-list">
            {{#if item.updatePath.canRead}}
              <li class="action">
                <SecretLink
                  @mode="show"
                  @secret={{itemPath}}
                  @class="has-text-black has-text-weight-semibold">
                  Details
                </SecretLink>
              </li>
            {{/if}}
            {{#if item.updatePath.canUpdate}}
              <li class="action">
                <SecretLink
                  @mode="edit"
                  @secret={{itemPath}}
                  @class="has-text-black has-text-weight-semibold">
                  Edit
                </SecretLink>
              </li>
            {{/if}}
          </ul>
        </nav>
      </PopupMenu>
      {{/if}}
    </div>
  </div>
  {{/linked-block}}
{{else}}
  <div class="list-item-row" data-test-view-only-list-item>
    <div class="columns is-mobile">
      <div class="column is-12 has-text-grey has-text-weight-semibold">
        <Icon
          @glyph='file-outline'
          @class="has-text-grey-light"/>
        {{if (eq item.id ' ') '(self)' (or item.keyWithoutParent item.id)}}
      </div>
    </div>
  </div>
{{/if}}
